package com.ruoyi.cbs.evaluate.service.impl;

import java.util.List;

import com.ruoyi.cbs.evaluate.domain.EvaluateRecord;
import com.ruoyi.cbs.evaluate.mapper.EvaluateRecordMapper;
import com.ruoyi.cbs.evaluate.service.IEvaluateRecordService;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 承包商考核记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-11-11
 */
@Service
public class EvaluateRecordServiceImpl implements IEvaluateRecordService
{
    @Autowired
    private EvaluateRecordMapper evaluateRecordMapper;

    /**
     * 查询承包商考核记录
     * 
     * @param id 承包商考核记录主键
     * @return 承包商考核记录
     */
    @Override
    public EvaluateRecord selectEvaluateRecordById(Long id)
    {
        return evaluateRecordMapper.selectEvaluateRecordById(id);
    }

    /**
     * 查询承包商考核记录列表
     * 
     * @param evaluateRecord 承包商考核记录
     * @return 承包商考核记录
     */
    @Override
    public List<EvaluateRecord> selectEvaluateRecordList(EvaluateRecord evaluateRecord)
    {
        return evaluateRecordMapper.selectEvaluateRecordList(evaluateRecord);
    }

    /**
     * 新增承包商考核记录
     * 
     * @param evaluateRecord 承包商考核记录
     * @return 结果
     */
    @Override
    public int insertEvaluateRecord(EvaluateRecord evaluateRecord)
    {
        evaluateRecord.setCreateTime(DateUtils.getNowDate());
        return evaluateRecordMapper.insertEvaluateRecord(evaluateRecord);
    }

    /**
     * 修改承包商考核记录
     * 
     * @param evaluateRecord 承包商考核记录
     * @return 结果
     */
    @Override
    public int updateEvaluateRecord(EvaluateRecord evaluateRecord)
    {
        evaluateRecord.setUpdateTime(DateUtils.getNowDate());
        return evaluateRecordMapper.updateEvaluateRecord(evaluateRecord);
    }

    /**
     * 批量删除承包商考核记录
     * 
     * @param ids 需要删除的承包商考核记录主键
     * @return 结果
     */
    @Override
    public int deleteEvaluateRecordByIds(Long[] ids)
    {
        return evaluateRecordMapper.deleteEvaluateRecordByIds(ids);
    }

    /**
     * 删除承包商考核记录信息
     * 
     * @param id 承包商考核记录主键
     * @return 结果
     */
    @Override
    public int deleteEvaluateRecordById(Long id)
    {
        return evaluateRecordMapper.deleteEvaluateRecordById(id);
    }
}
